<?php
namespace app\api\controller;
use think\Controller;
use app\api\model\User;

class Registered extends Controller{
    public function registered(){
        $account = input('account');
        $root    = input('root');
        $user = new User;
        $results = $user->registered($account,$root);
        if($results==1){
            AjaxReturn('1','注册成功',['results'=>$results]);
        }elseif($results==2){
            AjaxReturn('10001','该手机号已注册');
        }else{
            AjaxReturn('10002','系统错误,注册失败');
        }
    }
}